package dept

import (
	"mldong/api/base"

	"github.com/gogf/gf/v2/frame/g"
)

type SaveReq struct {
	g.Meta `path:"/sys/dept/save" tags:"部门管理" method:"post" summary:"添加部门"`
	DeptParam
}
type UpdateReq struct {
	g.Meta `path:"/sys/dept/update" tags:"部门管理" method:"post" summary:"修改部门"`
	DeptParam
}
type DetailReq struct {
	g.Meta `path:"/sys/dept/detail" tags:"部门管理" method:"post" summary:"部门详情"`
	ID     string `json:"id" dc:"部门ID" v:"required#请输入部门ID"`
}

type DetailRes struct {
	base.CommonResult
	Data DeptVO `json:"data" dc:"部门信息"`
}
type RemoveReq struct {
	g.Meta `path:"/sys/dept/remove" tags:"部门管理" method:"post" summary:"删除部门"`
	Ids    []string `json:"ids" dc:"部门ID集合" v:"required#请输入部门ID集合|min-length:1"`
}
type PageReq struct {
	g.Meta `path:"/sys/dept/page" tags:"部门管理" method:"post" summary:"部门分页查询"`
	base.PageParam
}
type ListReq struct {
	g.Meta `path:"/sys/dept/list" tags:"部门管理" method:"post" summary:"部门列表"`
	base.PageParam
}
type TreeReq struct {
	g.Meta `path:"/sys/dept/tree" tags:"部门管理" method:"post" summary:"部门树"`
	base.PageParam
}
type DeptPageVO struct {
	base.PageVO
	Rows []DeptVO `json:"rows" dc:"数据列表"`
}
type PageRes struct {
	base.CommonResult
	Data DeptPageVO `json:"data" dc:"部门分页返回实体"`
}
type ListRes struct {
	base.CommonResult
	Data []DeptVO `json:"data" dc:"部门返回列表实体"`
}
type TreeRes struct {
	base.CommonResult
	Data []DeptVO `json:"data" dc:"部门返回树实体"`
}